import { addingDataSources } from '@/pages/CodeTables/specification';
import { addDataBase } from '@/api/test/index';
const dataBase = reactive<addingDataSources>({
  dtCode: undefined, //数据库类型
  dsmName: '', //数据源名称
  dsmDescribe: '', //数据源描述
  dsmConnectInfo: '', //JDBC URL
  dsmDriverName: '', //驱动类名
  dsmUsername: '', //用户名
  dsmPassword: '', //密码
  status: 0, //判断是新增还是编辑
});
const databaseDrawer = ref<boolean>(false);

const addingData = async () => {
  await addDataBase(dataBase);
};
export function addingDataSourcesHooks() {
  return {
    dataBase,
    addingData,
    databaseDrawer,
  };
}
